class SumDescriptor:
  def __init__(self, a, b):
    self.a = a
    self.b = b 

  def __get__(self, instance, owner):
    # return getattr(instance, self.a) + getattr(instance, self.b)
    print('__get__')
    print(self.a + self.b)
    return self.a + self.b

class MyClass:
  def __init__(self, a, b):
    self.a = a
    self.b = b
    self.sum = SumDescriptor('a', 'b')

obj = MyClass(1, 2)
print(obj.sum)
